package com.lemurian.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.BatchSize;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

import com.lemurian.entity.utils.DefaultPersistence;

@Entity
@Table(name="tb_debitur")
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@BatchSize(size=100)
@Cache(usage=CacheConcurrencyStrategy.READ_WRITE)
public class Debitur extends DefaultPersistence implements Serializable {

	private static final long serialVersionUID = 1L;

	private String name;
	private String marriedCouple;
	private String telephone1;
	private String telephone2;
	
	@ManyToOne()
	@JoinColumn(name="status_id")
	private Category status;
	
	@ManyToOne()
	@JoinColumn(name="marriedCouple_status_id")
	private Category marriedCoupleStatus;
	
	@Column(name="name", length=45)
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}

	@Column(name="married_couple", length=45)
	public String getMarriedCouple() {
		return marriedCouple;
	}

	public void setMarriedCouple(String marriedCouple) {
		this.marriedCouple = marriedCouple;
	}

	@Column(name="telephone1", length=15)
	public String getTelephone1() {
		return telephone1;
	}

	public void setTelephone1(String telephone1) {
		this.telephone1 = telephone1;
	}

	@Column(name="telephone2", length=15)
	public String getTelephone2() {
		return telephone2;
	}

	public void setTelephone2(String telephone2) {
		this.telephone2 = telephone2;
	}

	public Category getStatus() {
		return status;
	}

	public void setStatus(Category status) {
		this.status = status;
	}

	public Category getMarriedCoupleStatus() {
		return marriedCoupleStatus;
	}

	public void setMarriedCoupleStatus(Category marriedCoupleStatus) {
		this.marriedCoupleStatus = marriedCoupleStatus;
	}

}